package interfaces;

/**
 * 抽象乐器类
 *
 * @author sun.ye
 * @since 2020-05-12 10:40
 */
public abstract class Instrument {

    private int i;
    public abstract void paly();
    public String what() {
        return "Instrument";
    }
    public abstract void adjust();

}

class Wind extends Instrument {

    @Override
    public void paly() {
        System.out.println("Wind.paly() 风琴");
    }

    @Override
    public void adjust() {
        System.out.println("Wind.adjust() 风琴");
    }
}

class Percussion extends Instrument {

    @Override
    public void paly() {
        System.out.println("Percussion.play() 打击乐器");
    }

    @Override
    public void adjust() {

    }

    @Override
    public String what() {
        return "Percussion";
    }
}